const Crypto_JS = require("crypto-js");
function decodeTimer(timer){
        let aseKey = "12345678"
    return Crypto_JS.AES.decrypt(timer, Crypto_JS.enc.Utf8.parse(aseKey), {
            mode: Crypto_JS.mode.ECB,
            padding: Crypto_JS.pad.Pkcs7
        }).toString(Crypto_JS.enc.Utf8)
}
function decodeToken(token){
    let aseKey = "19491001"
    let re=Crypto_JS.AES.decrypt(token, Crypto_JS.enc.Utf8.parse(aseKey), {
        mode: Crypto_JS.mode.ECB,
        padding: Crypto_JS.pad.Pkcs7
    }).toString(Crypto_JS.enc.Utf8)
    return re
}
module.exports={
    decodeTimer,decodeToken
}